var express = require('express')
var router = express.Router()
const MainController = require('../controller/mainController')

/* GET users listing. */
router.get('/', function (req, res, next) {
  res.send('respond with a resource')
})
//获得所有供应商列表
router.get('/getProviderList', MainController.getProviderList)
//分页查询供应商
router.get('/getProviderByPage', MainController.getProviderByPage)
//根据供应商编号名称查找供应商
router.get('/getProviderByProCode', MainController.getProviderByProCode)
//根据供应商的id查询供应商
router.get('/getProviderById', MainController.getProviderById)
//根据供应商的id修改供应商
router.put('/upateProviderById', MainController.upateProviderById)
//根据供应商的id修改供应商
router.post('/addProvider', MainController.addProvider)
//根据id删除供应商
router.delete('/deleteProviderById', MainController.deleteProviderById)
module.exports = router
